🎨 Palette: Smart Copy for Scratchpad - #15
Conversation
- Updates the 'Copy' button logic to copy only the selected text if a selection exists.
- Falls back to copying the entire content if no selection is made.
- Provides specific feedback ("Copied Selection!" vs "Copied!") for better UX.
- Improves accessibility by updating `aria-label` based on the action taken.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
💡 What: Implemented "Smart Copy" logic in the Scratchpad Webview.
🎯 Why: Previously, the "Copy" button always copied the entire content, ignoring user selection. This change aligns the behavior with user expectations—copying only the selection if one exists, and the full content otherwise.
📸 Before: Button always said "Copy" -> "Copied!".
📸 After: Button logic detects selection. If selected, "Copy" -> "Copied Selection!".
♿ Accessibility: Updated ARIA labels to reflect whether the full content or just the selection was copied. Also ensured focus remains on the button to allow screen readers to announce the status change.
PR created automatically by Jules for task 16440000269630619677 started by @Sisyphean-a